home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 36 / qemmtech.zip / EXCEPT13.TEC < prev    next >
Text File  |  1990-09-18  |  7KB  |  124 lines

  1. ID:13 Exception #13 and QEMM
  2. Quarterdeck Technical Note
  3. by Bob Perry and Dan Sallitt
  4.  
  5. Q: What is "Exception #13"?                              
  6. Q: What can be done to prevent "Exception #13"s?
  7.  
  8.      Exceptions are unusual or invalid conditions associated with 
  9. the execution of a particular instruction by the 80386 processor 
  10. (or higher processors).  The 80386 recognizes several different classes 
  11. of exceptions, and assigns a different vector number to each class. The 
  12. DESQview-386 memory manager, QEMM-386, has been designed to capture 
  13. these 80386 exception vectors and display them directly to the user.
  14.  
  15.      Exception #13 is the "General Protection Fault" error.  Any 
  16. privileged instruction or any instruction that references memory can 
  17. trigger an Exception #13. 
  18.  
  19.      In the first case, privileged instructions, the Exception #13 
  20. could indicate that a program has violated the protected mode of the 
  21. 80386 by executing a privileged instruction or I/O reference. Thus, 
  22. when the prompt, "Terminate, Reboot or Continue?" is issued, the 
  23. "Continue" option puts the system back into real mode, and the program 
  24. should continue to execute. (After choosing the "Continue" option, one 
  25. should not necessarily assume that the system is stable.  A reboot at 
  26. the earliest convenient time is probably wise.)
  27.  
  28.      It is the second case, instructions that reference memory, that is 
  29. far more common to DESQview 386 (and QEMM-386) users.  Here the 
  30. exception may indicate that an application has a bug, or that adverse 
  31. circumstances have sent it out of control.  It has over-written its 
  32. memory partition, and may in fact be running wild, writing code all over 
  33. the place.  This situation can occur with some programs that were 
  34. written for use on the 8088 processor and may not be usable in the 
  35. 80386's virtual 8086 mode.  A few other programs may not be compatible 
  36. with QEMM-386.  In some cases the problem occurs even without QEMM 
  37. present (in which case it manifests itself as a crash instead of an an 
  38. error message).  What this usually adds up to is that when "Terminate, 
  39. Reboot or Continue" is displayed, the user can usually only "Terminate."
  40.  
  41.      For those users who are more technically oriented, this over-
  42. writing of the memory partition generally means that a word or a 
  43. double word value of code has been written to the last byte of a 
  44. segment.  The problem or "bug" in the application program or in the 
  45. system shows up as an attempt to wrap the value to the next segment of 
  46. memory.
  47.  
  48.      What can the user do to prevent Exception #13's?   Because a great 
  49. many problems can result in Exception #13's, it is sometimes necessary 
  50. to resort to general troubleshooting techniques.  The DESQview 386 user 
  51. should start with two simple steps: first, run Change a Program and try 
  52. to allocate more memory to the application.  Second, the user can try to 
  53. increase the protection level of the afflicted window to 3, which will 
  54. not remove the source of the Exception #13, but may pass more 
  55. descriptive error messages through to the user.  
  56.  
  57.      When Exception #13's are obtained outside of DESQview they are 
  58. either caused by applications written for the 80386 protected mode or 
  59. they are not.  If the faulting application is written for the protected 
  60. mode of the 80386, it is likely that this program has no VCPI (Virtual 
  61. Control Program Interface) support.  Since QEMM-386 is a protected mode 
  62. program, such faulting applications cannot be run under QEMM without 
  63. VCPI.  The user has no choice but to reboot without QEMM, and contact 
  64. the developer of the faulting application to request VCPI support.
  65.  
  66.      If the faulting application was not written for the protected mode 
  67. of the 80386, a good possibility is that the QEMM user has installed 
  68. QEMM with the RAM parameter (which is necessary to LOADHI drivers and 
  69. TSR's).  In this case the faulting program may be running in an area of 
  70. high RAM that contains a memory conflict.  To correct this problem, the 
  71. user may opt to RAM only specific areas of memory, as described on page 
  72. 6 of the QEMM-386 manual, rather than to RAM all mappable areas.  Of 
  73. course, an area of conflict that is not RAMmed is still an area of 
  74. conflict, and may cause problems if another application tries to map 
  75. expanded memory into that region.  A better solution to such memory 
  76. conflicts might be to use the EXCLUDE parameter (described on page 5 of 
  77. the QEMM manual) on the area in conflict.  
  78.  
  79.      When in doubt about which areas to exclude, the user may wish to 
  80. pay special attention to areas that are marked "Rammable" on the 
  81. QEMM.COM Type screen, or to High RAM areas in the F000-FFFF area.  
  82. "Rammable" areas are usually adjacent to ROM areas, and the possiblilty 
  83. exists that the ROM is slightly bigger than QEMM could detect and is 
  84. spilling over into the "Rammable" area.  High RAM areas in the F000-FFFF 
  85. region are mapped over pieces of the system ROM that either QEMM or the 
  86. user have judged not to be in use.  Obviously, this judgment should be 
  87. questioned when Exception #13 messages occur.  The F000-FFFF area should 
  88. be scrutinized especially carefully when floppy disk access generates 
  89. the exception error. 
  90.  
  91. The QEMM.COM Accessed screen (also available as the Manifest QEMM-
  92. 386\Accessed screen) can give the user valuable hints about what areas 
  93. of memory are in use.  To use the Accessed screen, replace the RAM 
  94. parameter on the QEMM line in the CONFIG.SYS file with the ON parameter 
  95. and reboot the machine.  Any area that the Accessed screen then shows as 
  96. having been touched, but that the Type screen shows as Mappable or 
  97. Rammable, is a good candidate for exclusion.  If the Exception #13 error 
  98. only occurs with the RAM parameter present, you can now safely perform 
  99. the action that usually generates the error, then consult the Accessed 
  100. screen to see what areas of memory have been newly touched. 
  101.  
  102. Some pieces of hardware can come into conflict with QEMM or DESQview and 
  103. generate Exception #13 errors.  The most frequent offenders are bus-
  104. mastering devices (hard disk controllers, network cards, CD-ROM 
  105. controllers, etc.) and autoswitching video cards.  Bus-mastering hard 
  106. disk controllers often cause Exception #13 errors upon any use of the 
  107. LOADHI programs, for instance.  For approaches to this problem, see the 
  108. Quarterdeck Technical Note titled "Bus-Mastering Devices and QEMM-386."  
  109. Not all autoswitching video cards come into conflict with QEMM or other 
  110. pieces of software.  When a conflict occurs, however, it does not always 
  111. take the form of a video problem, and sometimes results in the Exception 
  112. #13 message.  Disabling autoswitching is the only solution to such a 
  113. problem.
  114.  
  115. General troubleshooting methods, like temporarily removing all TSR's, 
  116. device drivers and questionable QEMM parameters, often provide valuable 
  117. information about the exception error.  It sometimes happens that a 
  118. circumstance that generates an Exception #13 with QEMM present simply 
  119. causes the machine to crash without any message when QEMM is removed.  
  120. In such a case, QEMM is simply the bearer of bad news.
  121.  
  122.         Copyright (C) 1990 by Quarterdeck Office Systems
  123.              * * *   E N D   O F   F I L E    * * * 
  124.